<template>
	<view class="mainCss">
		<view class="bg">
			<img src="../../static/login/background.jpg" class="bgimg">
			<view class="close">
				<text style="white-space: nowrap;">{{second}}<text class="text">秒后跳过</text></text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				second: 3,
			}
		},
		onLoad() {
			const that = this
			var interval = setInterval(() => {
				let times = --that.second
				that.second = times
			}, 1000)
			setTimeout(function() {
				that.second = 3
				clearInterval(interval)
				uni.switchTab({
					url: '/pages/home/index',
				})
			}, 3000)
		},
		methods: {
			
		}
	}
</script>

<style>
	.bg {
		width: 100vw;
		height: 100vh;
		position: relative;
	}

	.close {
		width: 200rpx;
		height: 70rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		z-index: 1;
		background-color: #999999;
		border-radius: 20px;
		position: absolute;
		top: 5vh;
		left: 30rpx;
		color: #FF0000;
	}

	.text {
		color: #FFFFFF;
		margin-left: 10rpx;
	}

	.bgimg {
		width: 100%;
		height: 100%;
	}
</style>
